worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;

    server {
            listen 80;
            index index.php index.html;
            server_name 127.0.0.1 localhost;
            root /var/www/html/public;

            access_log /dev/stdout;
            error_log /dev/stdout debug;

            underscores_in_headers on;


            location ~ \.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|html)$ {
                    root /var/www/html/;
            }

            location / {
                try_files $uri /index.php?$args;
            }



            location ~ \.php$ {
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass web:9000;
                fastcgi_index index.php;
                fastcgi_read_timeout 1000;
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param PATH_INFO $fastcgi_path_info;
            }
        }
}